package com.ncloud.billing.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import com.ncloud.billing.entity.BsAttr;

@Mapper
public interface BsAttrMapper {
	
	@Select(value = {"select id, attr_type, attr_code, attr_value, attr_id, begin_date, end_date from bs_attr "
			+ "where attr_type='1' and id = #{discnt_inst_id} "})
	@Results({ @Result(column = "id", property = "id"), @Result(column = "attr_type", property = "attr_type"),
         @Result(column = "attr_code", property = "attr_code"),@Result(column = "attr_value", property = "attr_value"),
         @Result(column="attr_id",property="attr_id"),@Result(column="begin_date",property="begin_date"),
         @Result(column="end_date",property="end_date")})
	public List<BsAttr> getBsAttrByDiscntInstID(Long discnt_inst_id);
} 